package com.ruoyi.cms.service;

import com.ruoyi.cms.domain.Field;
import com.ruoyi.cms.domain.Form;
import com.ruoyi.cms.exception.TransactionException;

import java.util.List;
import java.util.Map;

public interface FormService {

    int add(Form form) throws TransactionException;

    void createTable(Form form);

    Form queryFormById(String id);

    int update(Form newForm, Form oldForm) throws TransactionException;

    void renameTable(Map<String, Object> params);

    int delete(Form form, List<Field> fields) throws TransactionException;

    void dropTable(String tableName);

    void alterTableAddColumn(String sql);

    void alterTableDropColumn(String string);

    void alterTableChangeColumn(String string);

    List<Form> queryAll();

    Form queryDefaultForm();

    Form queryFormByCode(String value);

}
